//
//  HCConsoleLogger.h
//  HCToolBox
//
//  Created by Hotacool on 2019/3/18.
//

#import <CocoaLumberjack/CocoaLumberjack.h>

typedef void(^HCConsoleLoggerBlk)(NSArray<DDLogMessage*>*);
NS_ASSUME_NONNULL_BEGIN

@interface HCConsoleLogger : DDAbstractLogger <DDLogFormatter>
@property (nonatomic, copy, readonly) NSArray <DDLogMessage*>* logMessages;
@property (nonatomic, assign) NSUInteger maxMessages;
@property (nonatomic, assign) NSTimeInterval updateInterval;

- (void)subscribNext:(nullable HCConsoleLoggerBlk)logBlock;
- (void)clear;
@end

NS_ASSUME_NONNULL_END
